﻿using System.Data.Common;
using System.Data;

namespace GrainManage.Data.Provider
{
    public abstract class ProviderBase
    {
        protected string ConnectionString;

        public ProviderBase(string connectionString)
        {
            this.ConnectionString = connectionString;
        }

        public abstract DbConnection Connection { get; }

        public abstract DbCommand GetCommand(string cmdText, DbConnection connection);

        public abstract DbDataAdapter GetAdapter(string selectCmdText);

        public abstract DbParameter GetDbParameter(string paraName, object value, ParameterDirection direction = ParameterDirection.Input);

    }
}
